package com.norra.base.viewmodel

import com.norra.base.api.HError

class NetworkResource<T> private constructor(t: T?, hError: HError?) : Resource<T, HError>(t, hError) {

    companion object {

        fun <T> success(t: T) = NetworkResource(t, null)

        fun <T> error(e: HError) = NetworkResource(null as T, e)
    }

}
